//
//  main.cpp
//  Practice3
//
//  Created by 赵世杰 on 2020/6/14.
//  Copyright © 2020 zhaoshijie. All rights reserved.
//

#include <iostream>
#include <math.h>

using namespace std;

const float heightChangeScale = 0.0254;
const float weightChangeScale = 2.2;

int main(int argc, const char * argv[]) {
    
    
    /*
     
     1、
     
    cout << "请输入身高：";
    
    float height ;
    
    cin >> height;
    
    float sizeHeight = height/heightChangeScale;
    
    cout << endl;
    
    cout << "身高英尺为：" << sizeHeight << endl;
    
    
    cout << "身高英寸为：" << ((int)sizeHeight)/12<< '.' << ((int)sizeHeight)%12 << endl;
     */
    
    /*
    2、
    cout << "请输入身高英寸英尺_英寸:";
    
    float height1;
    
    cin >> height1;
    
    cout << "请输入身高英寸英尺_英尺:";
    
    float height2;
    
    cin >> height2;
    
    float height = (height1*12+height2)*heightChangeScale;
    
    cout << "计算的身高" << height1 << "英尺" << height2 << "英寸:" << height << "米";
    
    cout << endl;
    
    
    
    cout << "请输入英镑kg：";
    
    float weight ;
    
    cin >> weight;
    
    cout << "计算的体重为kg为：" << weight/2.2 << endl;
    
    weight = weight/2.2;
    
    float compult = pow(weight/height, 2);
    
    cout << "身高：" << height << " 体重：" << weight << " 的BMI为：" << compult << endl;
    
     */
    
    
    /*
    // 3、
    
    cout << "请输入纬度：" ;
    
    float first ;
    
    cin >> first ;
    
    float next ;
    
    cin >> next;
    
    float next2;
    
    cin >> next2;
    
    first = first ;
    
    next = next/60;
    next2 = next2/3600;
    
    cout << first+next+next2 << "degrees";
    */
    
    
    /*
     
     // 4、
    cout << "Enter the nmuber of seconds:";
    
    int seconds ;
    
    cin >> seconds;
    
    cout << seconds << " seconds = " << seconds/(60*60*24) << " days, " << seconds%(60*60*24)/(60*60) << " hours, " << seconds%(60*60*24)%(60*60)/60 << " minutes, " << seconds%(60*60*24)%(60*60)%60 << " seconds" << endl;
    */
    
    
    /*
    // 5、
    cout << "Enter the world's population:"<<endl;
    
    long number0;
    
    cin >> number0;
    
    cout << "Enter the poplation of the US:" << endl;
    
    long number1 ;
    
    cin >> number1;
    
    cout << "The population of the US is " << (number1/(float)number0)*100 << "% of the world population"<< endl;
    */
    
    
    /*
    
    // 6、
    cout << "请输入驱车里程";
    
    int mileage;
    
    cin >> mileage;
    
    cout << "请输入汽油量";
    
    int gasoline;
    
    cin >> gasoline;
    
    cout << "一加仑的里程:" << mileage/(float)gasoline << endl;
    
    cout << "100公里的油耗：" << gasoline/(float)mileage * 100 << endl;
    
     */
    
    
    
    
    return 0;
}
